package com.example.springbootelsatic.service;

import com.example.springbootelsatic.model.Person;
import org.elasticsearch.common.io.stream.NamedWriteable;
import org.elasticsearch.index.query.MatchQueryBuilder;
import org.springframework.data.domain.Sort;

import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface PersonService {
    //添加
    Person save(Person person);
    //批量添加
    Iterable<Person> saveAll(List<Person> personList);
    //查询
    Iterable<Person> findByAgeBetween(int i, int i1);

    //测试删除
    String deleteById(int id);
   //更新
    boolean update(Person person1);
   //构造高级查询
    List<Person>customAdvanceSelect(String name);



    //按年龄倒叙
      void select1();



}
